package cc.ipost.ipost;

import java.util.List;

import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.view.View;

public class PostViewPagerAdapter extends PagerAdapter{
	public List<View> mListViews;
	
	public PostViewPagerAdapter(List<View> mListViews){
		this.mListViews = mListViews;
	}
	@Override
	public int getCount() {
		return this.mListViews.size();
	}

	@Override
	public boolean isViewFromObject(View arg0, Object arg1) {
		return arg0 == (arg1);
	}
	@Override
	         public Object instantiateItem(View arg0, int arg1) {
	             ((ViewPager) arg0).addView(mListViews.get(arg1), 0);
	             return mListViews.get(arg1);
	         }

}
